import type { Router } from "vue-router";

function createPageGuard(router: Router) {
  const loadedPageMap = new Map<string, boolean>();

  router.beforeEach(async (to) => {
    return true;
  });

  router.afterEach((to) => {
    loadedPageMap.set(to.path, true);
  });
}

export function setupRouterGuard(router: Router) {
  createPageGuard(router);
}
